#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_left_clicked()
{
    ui->pushButton_left->setEnabled(false);
    ui->pushButton_left->setText("fuck you");
    qDebug("Thanks you mother fuck");
    Sleep(3000);
    ui->label->setText("Thanks you mother fuck");
    Widget::close();
}


void Widget::on_pushButton_right_pressed()
{
    int x = ui->pushButton_right->geometry().x(),n_x = x;
    int y = ui->pushButton_right->geometry().y(),n_y = y;
    int index = 538;
    int indey = 481;
    while(x == n_x||y == n_y)
    {
        n_x = rand()%index;
        n_y = rand()%indey;
    }
    if(n_x == index - 1)n_x - 10;
    if(n_y == indey - 1)n_y - 10;
    ui->pushButton_right->move(n_x,n_y);
    qDebug("FUCK!!!");
    ui->label->setText("FUCK YOU!!!");
}
